package com.nanhai.buddhist.college.module.collegebase.api.college;


import com.nanhai.buddhist.college.framework.common.pojo.CommonResult;
import com.nanhai.buddhist.college.module.collegebase.api.college.dto.CollegesRespDTO;
import com.nanhai.buddhist.college.module.collegebase.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;
@Api(tags = "RPC 服务 - 学院数据提供")
@FeignClient(name = ApiConstants.NAME)
public interface CollegeApi {

    String PREFIX = ApiConstants.PREFIX + "/colleges";

    @GetMapping(PREFIX + "/list")
    @ApiOperation("获取学院数据 列表")
    CommonResult<List<CollegesRespDTO>> getCollegesList(@RequestParam("ids") Collection<String> ids);

    @GetMapping(PREFIX + "/info")
    @ApiOperation("获取学院数据 详情")
    CommonResult<CollegesRespDTO> getCollegesInfo(@RequestParam("id") String id);

    @GetMapping(PREFIX + "/all")
    @ApiOperation("获取学院数据 详情")
    CommonResult<List<CollegesRespDTO>> getCollegesAll();
}
